﻿@model Core.Models.MainMenu

@{
    ViewBag.Title = "Edit Main Menu Option";
    List<Core.Models.Permission> plist = ViewBag.PermissionList;
}

<h1>@ViewBag.Title</h1>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(false)
    <fieldset>
        @Html.HiddenFor(model => model.MenuItemId)
        @Html.HiddenFor(model => model.DomainId)

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Name, new { size="10"})
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.URL)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.URL, new { size="40"})
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.UserPermission)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.UserPermission,new SelectList(plist,"Name","Name",Model.UserPermission))
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Sequence)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Sequence, new { size="5"})
        </div>

        <div class="editor-label">
            &nbsp;
        </div>
        <div class="editor-field">
            @Html.CheckBoxFor(model => model.HideOnSmallDevice) @Html.LabelFor(model => model.HideOnSmallDevice)
        </div>
    </fieldset>
    <p>
        <br />
        <input type="submit" value="Save" /> |
        @Html.ActionLink("Back to List", "Index")
    </p>
}

